package com.order.util;

import com.order.cons.Const;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

/**
 * Description:
 *
 * @author weiruibai.vendor
 * Date: 2022/9/19 14:25
 */
@Service
public class RedisUtil {


    @Autowired
    private RedisTemplate<String, Object> redisTemplate;

    /**
     * 发送消息
     * @param id
     */
    public void publishMsg(String id) {
        redisTemplate.convertAndSend(Const.ORDER_TOPIC, id);
    }

}
